package com.tomecode.mjprocessor.assembly.action;

import com.tomecode.mjprocessor.assembly.type.ProjectActions;

/**
 * 
 * Action contains xpath (for xml) or property name (for properties) and new
 * value
 * 
 * @author Frastia Tomas
 * 
 */
public final class Action {

	/**
	 * new value to {@link ProjectActions#getTargetFile()}
	 */
	private String value;

	/**
	 * xpath for select element in {@link ProjectActions#getTargetFile()}
	 */
	private String xPath;

	/**
	 * property name {@link ProjectActions#getTargetFile()}
	 */
	private String propertyName;
	/**
	 * action type
	 */
	private final ActionType actionType;

	/**
	 * Construktor
	 * 
	 * @param actionType
	 */
	public Action(ActionType actionType) {
		this.actionType = actionType;
	}

	/**
	 * get {@link #value}
	 * 
	 * @return
	 */
	public final String getValue() {
		return value;
	}

	/**
	 * set {@link #value}
	 * 
	 * @param value
	 */
	public final void setValue(String value) {
		this.value = value;
	}

	/**
	 * get {@link #xPath}
	 * 
	 * @return
	 */
	public final String getXPath() {
		return xPath;
	}

	/**
	 * set {@link #xPath}
	 * 
	 * @param xPath
	 */
	public final void setXPath(String xPath) {
		this.xPath = xPath;
	}

	/**
	 * get {@link ActionType}
	 * 
	 * @return
	 */
	public final ActionType getActionType() {
		return actionType;
	}

	/**
	 * get {@link #propertyName}
	 * 
	 * @return
	 */
	public final String getPropertyName() {
		return propertyName;
	}

	/**
	 * set {@link #propertyName}
	 * 
	 * @param propertyName
	 */
	public final void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}

}
